package com.code;

import java.util.ArrayList;

import com.example.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class DetailThuChi extends Activity{
	private ArrayList<String> detail;
	private TextView tvKho,tvDiaChi,tvNgay;
	private Button btnTroVe;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.detailthuchi);
		detail = super.getIntent().getExtras().getStringArrayList("detailthuchi");
		tvKho = (TextView) findViewById(R.id.tvKhoThuChi);
		tvDiaChi = (TextView) findViewById(R.id.tvThuChiDiaChi);
		tvNgay = (TextView) findViewById(R.id.tvNgayThuChi);
		btnTroVe = (Button) findViewById(R.id.btnTroVeThuChi);
		
		String title = detail.get(0);
		this.setTitle(title);
		tvKho.setText(detail.get(1));
		tvDiaChi.setText(detail.get(2));
		tvNgay.setText(detail.get(3));
		
		btnTroVe.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				setResult(RESULT_CANCELED);
				finish();
			}
		});
	}
}
